# 冒泡排序
# lis=[5,6,1,12,5,3,9,11]
# for i in range(0,len(lis)-1):
#     for j in range(1,len(lis)-i):
#         if lis[j]<lis[j-1]:
#             lis[j],lis[j-1]=lis[j-1],lis[j]
#         else:
#             continue
# print(lis)
# 快速排序
lis=[5,6,1,12,5,3,9,11]
for i in range(0,len(lis)):
    for j in range(0,len(lis)-1):
        if lis[i]>=lis[j]:
            num=lis[i]
            lis[i]=lis[j]
            lis[j]=num
            # lis[i],lis[j]=lis[j],lis[i]
        else:
            continue
print(lis)



